<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../style.css" rel="stylesheet" type="text/css">
    <link rel="icon" href="../../images/PETSc_RGB-logo.png" type="image/png" sizes="16x16">
    <title>PETSc: Documentation: Changes: 3.0.0</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1><!--begin-->Documentation: Changes: 3.0.0<!--end--></h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../../index.html">Home</a></li>
        <li><a href="../../download/index.html">Download</a></li>
        <li><a href="../../features/index.html">Features</a></li>
        <li>
          <a href="../../documentation/index.html">Documentation</a>
          <ul>
            <li><a href="../index.html">Manual pages and Users Manual</a></li>
            <li><a href="../referencing.html">Referencing PETSc</a></li>
            <li><a href="../tutorials/index.html">Tutorials</a></li>
            <li><a href="../installation.html">Installation</a></li>
            <li><a href="../saws.html">SAWs</a></li>
            <li>
              <a href="index.html">Changes</a>
              <ul>
                <li><a href="dev.html">dev</a></li>
                <li><a href="313.html">3.13</a></li>
                <li><a href="312.html">3.12</a></li>
                <li><a href="311.html">3.11</a></li>
                <li><a href="310.html">3.10</a></li>
                <li><a href="39.html">3.9</a></li>
                <li><a href="38.html">3.8</a></li>
                <li><a href="37.html">3.7</a></li>
                <li><a href="36.html">3.6</a></li>
                <li><a href="35.html">3.5</a></li>
                <li><a href="34.html">3.4</a></li>
                <li><a href="33.html">3.3</a></li>
                <li><a href="32.html">3.2</a></li>
                <li><a href="31.html">3.1</a></li>
                <li><span class="current">3.0.0</span></li>
                <li><a href="233.html">2.3.3</a></li>
                <li><a href="232.html">2.3.2</a></li>
                <li><a href="231.html">2.3.1</a></li>
                <li><a href="230.html">2.3.0</a></li>
                <li><a href="221.html">2.2.1</a></li>
                <li><a href="220.html">2.2.0</a></li>
                <li><a href="216.html">2.1.6</a></li>
                <li><a href="215.html">2.1.5</a></li>
                <li><a href="213.html">2.1.3</a></li>
                <li><a href="212.html">2.1.2</a></li>
                <li><a href="211.html">2.1.1</a></li>
                <li><a href="21.html">2.1.0</a></li>
                <li><a href="2029.html">2.0.29</a></li>
                <li><a href="2028.html">2.0.28</a></li>
                <li><a href="2024.html">2.0.24</a></li>
                <li><a href="2022.html">2.0.22</a></li>
                <li><a href="2018-21.html">2.0.18-21</a></li>
                <li><a href="2017.html">2.0.17</a></li>
                <li><a href="2016.html">2.0.16</a></li>
                <li><a href="2015.html">2.0.15</a></li>
              </ul>
            </li>
            <li><a href="../bugreporting.html">Bug Reporting</a></li>
            <li><a href="../codemanagement.html">Code Management</a></li>
            <li><a href="../faq.html">FAQ</a></li>
            <li><a href="../license.html">License</a></li>
            <li><a href="../linearsolvertable.html">Linear Solver Table</a></li>
            <li><a href="../nonlinearsolvertable.html">Nonlinear Solver Table</a></li>
	    <li><a href="../taosolvertable.html">TAO Solver Table</a></li>
          </ul>
        </li>
        <li><a href="../../publications/index.html">Applications/Publications</a></li>
        <li><a href="../../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../../miscellaneous/external.html">External Software</a></li>
        <li><a href="https://docs.petsc.org/en/latest/developers/index.html">Developers Site</a></li>
      </ul>
    </div>

    <!--begin-->

    <style type="text/css">
      h2 {
        color: red;
      }

      h4 {
        font-weight: bold;
        text-decoration: underline;
      }
    </style>

    <div id="main">

      <div align="center">
        <h2><a name="CHANGES">CHANGES in PETSc 3.0.0</a></h2>
      </div>

      <h4>General:</h4>

      <ul>
        <li>
          Changed the Matlab engine portion of the Matlab configure code to
          require a separate flag --with-matlab-engine
        </li>

        <li>
          Changed the Socket viewer to be the same as the binary viewer except
          for its creation
        </li>

        <li>
          Changed the Matlab Socket code to work the same as the Matlab binary
          reader except for its creation
        </li>

        <li>
          You can now replace the PetscVFPrintf() function pointer to redirect
          all stdout/stderr output in Windows for example.
        </li>

        <li>
          Removed MPICCommToFortran() and MPIFortranCommToC() since
          MPI_Comm_c2f() and f2c() are now always available.
        </li>

        <li>
          PetscOptionsInsertFile() now takes a MPI_Comm as the first argument
          and a final flag argument indicating if the file &nbsp;MUST be
          located. It is also changed to be more scalable, only the 0th process
          opens it and broadcasts the input to the other processes.
        </li>

        <li>
          Added PetscObjectIncrementTabLevel() to allow proper indenting of
          monitor output for imbedded solvers for multigrid levels, for block
          Jacobi, for SNES inside TS and KSP inside SNES etc.
        </li>
      </ul>

      <h4>Logging:</h4>

      <ul>
        <li>The int stage used in the PetscLogStageXXX() routines is now a PetscLogStage</li>

        <li>
          PetscLogEventRegister() and PetscLogStageRegister() now return the
          result in the final argument instead of the first
        </li>

        <li>
          PetscLogClassRegister() is changed to PetscClassIdRegister() and
          returns the classid in the final argument, not the first
        </li>

        <li>PetscEvent is now PetscLogEvent</li>
      </ul>

      <h4>config/configure.py:</h4>

      <ul>
        <li>Changed location of base makefiles to conf from bmake/common</li>
        <li>
          Changed location of generated base makefiles to $PETSC_ARCH/conf
          instead of bmake/$PETSC_ARCH
        </li>
        <li>Changed location of generated include files to $PETSC_ARCH/include</li>
        <li>Changed location of generated libraries (including from external packages) to $PETSC_ARCH/lib</li>
        <li>You will need to change include ${PETSC_DIR}/bmake/common/base to ${PETSC_DIR}/conf/base</li>
      </ul>

      <h4>IS:</h4>

      <ul>
        <li>
          ISPartitioningCount() now takes an additional argument, the length of
          the count array (that is the number of partitions).
        </li>
      </ul>

      <h4>Vec:</h4>

      <ul>
        <li>Added logical argument to VecSetOption() to toggle option in either way</li>

        <li>
          The PetscMap inside the Vec object is now allocated and reference
          counted and shared between vectors and matrices, this will decrease
          memory usage on systems with a large size.
        </li>
      </ul>

      <h4>VecScatter:</h4>
      <h4>Mat:</h4>

      <ul>
        <li>
          MatSetOption() now takes a final PetscTruth flag to toggle the
          option. The redundant options like MAT_NO_SYMMETRIC are removed
        </li>

        <li>
          The MatSetOption() options MAT_ROWS_SORTED, MAT_COLUMNS_SORTED are no
          longer needed and are removed.
        </li>

        <li>MatConvert() now uses the matrix prefix when using option -matconvert_type.</li>
        <li>The bdiag matrix formats have been removed</li>

        <li>
          MatTranspose() now takes a new second argument MatReuse; also to do
          an inplace transpose use MAT_REUSE_MATRIX and pass the address of the
          first argument as the third argument (you can no longer pass 0).
        </li>

        <li>
          MATPLAPACK is removed; instead so long as PETSc is
          config/configure.py with --download-plapack the MATMPIDENSE matrix
          will automatically use the parallel plapack solvers
        </li>

        <li>
          The "parallel direct solver" matrix types like<br> MATAIJSPOOLES are
          ALL gone. Now you use -pc_factor_mat_solver_package<br> spooles etc
          or PCFactorSetMatSolverPackage() or if working directly with<br>
          matrices, MatGetFactor(A,MATSPOOLES,...)
        </li>

        <li>
          Removed MatFDColoringSetRecompute(), now use
          MatFDSetFrequency(mat,-2) to have Jacobian computed at next Newton
          step but never again.
        </li>

        <li>
          Removed MatFDColoringSet/GetFrequency() and -mat_fd_coloring_freq
          since you can now use SNESSetLagJacobian() or -snes_lag_jacobian
        </li>

        <li>
          The PetscMap inside the Mat object is now allocated and reference
          counted and shared between vectors and matrices, this will decrease
          memory usage on systems with a large size.
        </li>

        <li>
          The first argument to MatXXXFactorSymbolic/Numeric() is now the
          factored matrix
        </li>

        <li>
          The fields global_rows,global_columns,local_rows,local_columns have
          been removed from the MatGetInfo() data. User MatGetSize(),
          MatGetLocalSize() to get that data
        </li>
      </ul>

      <h4>PC:</h4>

      <ul>
        <li>PCHasApplyTranspose() was renamed to PCApplyTransposeExists().</li>
        <li>Added much faster matrix converter to use hypre preconditioners for PETSc AIJ matrices</li>
        <li>ILU preconditioner now defaults to use shift to prevent zero pivot</li>
        <li>ICC preconditioner now defaults to use Manteuffel shift to force positive definiteness</li>
        <li>Added -pc_factor_shift_in_blocks and PCFactorSetShiftInBlocks() made default for ILU</li>

        <li>
          PCApplyRichardson() now returns two additional arguments, the number
          of iterations performed and the reason it finished.
        </li>
      </ul>

      <h4>KSP:</h4>

      <ul>
        <li>
          KSPSetConvergenceTest() now takes an optional final argument,
          destroy() that will be called to destroy the context passed in as the
          second to last argument
        </li>

        <li>
          KSPDefaultConverged() now has a KSPDefaultConvergedCreate() and
          KSPDefaultConvergedDestroy() that creates the default context to be
          passed KSPSetConvergenceTest() and the destroy to be passed in.
        </li>
        <li>
          Added KSPIBCGS a varient of Bi-CG-stab that has only
          1 synchronization point rather than 3 in the usual.
        </li>
      </ul>

      <h4>SNES:</h4>

      <ul>
        <li>
          SNESSetRhs() and SNESSetSolution() were removed. Use instead
          SNESSolve(snes, b, x) to pass right hand side (optional, can be
          PETSC_NULL) and solution (required).
        </li>

        <li>
          SNES now takes ownership of user-provided vector for right hand side
          and solution passed to SNESSolve(), and until the next SNESSolve() is
          called.
        </li>

        <li>
          SNES now takes ownership of user-provided vector for function
          evalutation passed to SNESSetFunction(), thus this vector can be
          safely destroyed after this call.
        </li>

        <li>
          SNESConverged_LS() and SNESConverged_LS() were removed. Use
          SNESDefaultConverged() or SNESSkipConverged() as convergence
          test.
        </li>

        <li>
          Option -snes_convergence_test was added, accepting values
          default|short, for setting SNESDefaultConverged() or
          SNESSkipConverged() as convergence test.
        </li>

        <li>
          Option -snes_no_convergence_test was removed. Use instead
          "-snes_convergence_test skip".
        </li>

        <li>
          Do not use the error PETSC_ERR_ARG_DOMAIN within your FormFunction()
          rather call SNESSetFunctionDomainError.
        </li>

        <li>The line search functions now take an additional argument xnorm.</li>

        <li>
          SNESSetConvergenceTest() takes another optional argument
          PetscErrorCode (*destroy)(void*) that will be called with
          SNESDestroy() to destroy the context.
        </li>

        <li>
          Added SNESSetLagPreconditioner(), -snes_lag_preconditioner, SNESGetLagPreconditioner()
        </li>

        <li>Added SNESSetLagJacobian(), -snes_lag_jacobian, SNESGetLagJacobian()</li>
      </ul>

      <h4>TS:</h4>
      <h4>DA:</h4>

      <ul>
        <li>Added DAGetNeighbors()</li>
        <li>Added DAGetOwnershipRanges()</li>
      </ul>

      <h4>DMMG:</h4>

      <ul>
        <li>
          Added DMMGSetFromOptions(), this can only be used in conjunction with
          DMMGSetSNES(). You should call this sometime after DMMGSetSNES() is
          called, otherwise the SNES/KSPSetFromOptions() does not get
          called.
        </li>

        <li>
          Removed -dmmg_snes_monitor since now -snes_monitor and
          -snes_monitor_short will now do the proper indenting so this is no
          longer needed
        </li>

        <li>
          Removed -dmmg_ksp_monitor since now -ksp_monitor[_short) and
          -mg_levels_ksp_monitor[_short) etc will handle the proper
          indenting.
        </li>

        <li>
          Removed -dmmg_jacobian_period since you can use
          -snes_lag_jacobian
        </li>
      </ul>

      <h4>PetscViewer:</h4>

      <ul>
        <li>added PETSC_VIEWER_STDOUT_(comm) for Fortran</li>

        <li>
          binary viewer now supports MPI IO for Vec loading and storing, use
          -viewer_binary_mpiio or PetscViewerBinarySetMPIIO() to enable
          it.
        </li>

        <li>
          Reworked the Matlab objects sreader and freader to be called
          PetscOpenSocket and PetscOpenFile, now PetscBinaryWrite and
          PetscBinaryRead can be used on the same socket connection to send
          matrix/vectors in both directions. See
          src/ksp/ksp/examples/tutorials/ex41.c and ex41.m
        </li>
      </ul>

      <h4>SYS:</h4>

      <ul>
        <li>
          PetscLogFlopsNoCheck() no longer exists; you can simply call
          PetscLogFlops() it no longer has a return in it.<br>
        </li>
      </ul>

      <h4><a href="https://www.mcs.anl.gov/petsc/miscellaneous/external.html">ExternalPackages</a>:</h4>

    </div>

    <!--end-->

    <hr>

  </body>
</html>
